diff --git a/include/efi_selftest.h b/include/efi_selftest.h
index 59b3c08..56beac3 100644
--- a/include/efi_selftest.h
+++ b/include/efi_selftest.h
@@ -76,6 +76,22 @@
 void efi_st_printc(int color, const char *fmt, ...)
 		 __attribute__ ((format (__printf__, 2, 3)));
 
+/**
+ * efi_st_translate_char() - translate a unicode character to a string
+ *
+ * @code:	unicode character
+ * Return:	string
+ */
+u16 *efi_st_translate_char(u16 code);
+
+/**
+ * efi_st_translate_code() - translate a scan code to a human readable string
+ *
+ * @code:	unicode character
+ * Return:	string
+ */
+u16 *efi_st_translate_code(u16 code);
+
 /*
  * Compare memory.
  * We cannot use lib/string.c due to different CFLAGS values.
diff --git a/lib/efi_selftest/efi_selftest_textinput.c b/lib/efi_selftest/efi_selftest_textinput.c
index 7aa84de..40b0a8b 100644
--- a/lib/efi_selftest/efi_selftest_textinput.c
+++ b/lib/efi_selftest/efi_selftest_textinput.c
@@ -14,113 +14,8 @@
 
 #include <efi_selftest.h>
 
-struct translate {
-	u16 code;
-	u16 *text;
-};
-
 static struct efi_boot_services *boottime;
 
-static struct translate control_characters[] = {
-	{0, L"Null"},
-	{8, L"BS"},
-	{9, L"TAB"},
-	{10, L"LF"},
-	{13, L"CR"},
-	{0, NULL},
-};
-
-static u16 ch[] = L"' '";
-static u16 unknown[] = L"unknown";
-
-static struct translate scan_codes[] = {
-	{0x00, L"Null"},
-	{0x01, L"Up"},
-	{0x02, L"Down"},
-	{0x03, L"Right"},
-	{0x04, L"Left"},
-	{0x05, L"Home"},
-	{0x06, L"End"},
-	{0x07, L"Insert"},
-	{0x08, L"Delete"},
-	{0x09, L"Page Up"},
-	{0x0a, L"Page Down"},
-	{0x0b, L"FN 1"},
-	{0x0c, L"FN 2"},
-	{0x0d, L"FN 3"},
-	{0x0e, L"FN 4"},
-	{0x0f, L"FN 5"},
-	{0x10, L"FN 6"},
-	{0x11, L"FN 7"},
-	{0x12, L"FN 8"},
-	{0x13, L"FN 9"},
-	{0x14, L"FN 10"},
-	{0x15, L"FN 11"},
-	{0x16, L"FN 12"},
-	{0x17, L"Escape"},
-	{0x68, L"FN 13"},
-	{0x69, L"FN 14"},
-	{0x6a, L"FN 15"},
-	{0x6b, L"FN 16"},
-	{0x6c, L"FN 17"},
-	{0x6d, L"FN 18"},
-	{0x6e, L"FN 19"},
-	{0x6f, L"FN 20"},
-	{0x70, L"FN 21"},
-	{0x71, L"FN 22"},
-	{0x72, L"FN 23"},
-	{0x73, L"FN 24"},
-	{0x7f, L"Mute"},
-	{0x80, L"Volume Up"},
-	{0x81, L"Volume Down"},
-	{0x100, L"Brightness Up"},
-	{0x101, L"Brightness Down"},
-	{0x102, L"Suspend"},
-	{0x103, L"Hibernate"},
-	{0x104, L"Toggle Display"},
-	{0x105, L"Recovery"},
-	{0x106, L"Reject"},
-	{0x0, NULL},
-};
-
-/*
- * Translate a unicode character to a string.
- *
- * @code	unicode character
- * @return	string
- */
-static u16 *translate_char(u16 code)
-{
-	struct translate *tr;
-
-	if (code >= ' ') {
-		ch[1] = code;
-		return ch;
-	}
-	for (tr = control_characters; tr->text; ++tr) {
-		if (tr->code == code)
-			return tr->text;
-	}
-	return unknown;
-}
-
-/*
- * Translate a scan code to a human readable string.
- *
- * @code	unicode character
- * @return	string
- */
-static u16 *translate_code(u16 code)
-{
-	struct translate *tr;
-
-	for (tr = scan_codes; tr->text; ++tr) {
-		if (tr->code == code)
-			return tr->text;
-	}
-	return unknown;
-}
-
 /*
  * Setup unit test.
  *
@@ -160,9 +55,9 @@
 
 		efi_st_printf("Unicode char %u (%ps), scan code %u (%ps)\n",
 			      (unsigned int)input_key.unicode_char,
-			      translate_char(input_key.unicode_char),
+			      efi_st_translate_char(input_key.unicode_char),
 			      (unsigned int)input_key.scan_code,
-			      translate_code(input_key.scan_code));
+			      efi_st_translate_code(input_key.scan_code));
 
 		switch (input_key.unicode_char) {
 		case 'x':
diff --git a/lib/efi_selftest/efi_selftest_util.c b/lib/efi_selftest/efi_selftest_util.c
index 87a04f8..96a964c 100644
--- a/lib/efi_selftest/efi_selftest_util.c
+++ b/lib/efi_selftest/efi_selftest_util.c
@@ -9,6 +9,99 @@
 
 #include <efi_selftest.h>
 
+struct efi_st_translate {
+	u16 code;
+	u16 *text;
+};
+
+static struct efi_st_translate efi_st_control_characters[] = {
+	{0, L"Null"},
+	{8, L"BS"},
+	{9, L"TAB"},
+	{10, L"LF"},
+	{13, L"CR"},
+	{0, NULL},
+};
+
+static u16 efi_st_ch[] = L"' '";
+static u16 efi_st_unknown[] = L"unknown";
+
+static struct efi_st_translate efi_st_scan_codes[] = {
+	{0x00, L"Null"},
+	{0x01, L"Up"},
+	{0x02, L"Down"},
+	{0x03, L"Right"},
+	{0x04, L"Left"},
+	{0x05, L"Home"},
+	{0x06, L"End"},
+	{0x07, L"Insert"},
+	{0x08, L"Delete"},
+	{0x09, L"Page Up"},
+	{0x0a, L"Page Down"},
+	{0x0b, L"FN 1"},
+	{0x0c, L"FN 2"},
+	{0x0d, L"FN 3"},
+	{0x0e, L"FN 4"},
+	{0x0f, L"FN 5"},
+	{0x10, L"FN 6"},
+	{0x11, L"FN 7"},
+	{0x12, L"FN 8"},
+	{0x13, L"FN 9"},
+	{0x14, L"FN 10"},
+	{0x15, L"FN 11"},
+	{0x16, L"FN 12"},
+	{0x17, L"Escape"},
+	{0x68, L"FN 13"},
+	{0x69, L"FN 14"},
+	{0x6a, L"FN 15"},
+	{0x6b, L"FN 16"},
+	{0x6c, L"FN 17"},
+	{0x6d, L"FN 18"},
+	{0x6e, L"FN 19"},
+	{0x6f, L"FN 20"},
+	{0x70, L"FN 21"},
+	{0x71, L"FN 22"},
+	{0x72, L"FN 23"},
+	{0x73, L"FN 24"},
+	{0x7f, L"Mute"},
+	{0x80, L"Volume Up"},
+	{0x81, L"Volume Down"},
+	{0x100, L"Brightness Up"},
+	{0x101, L"Brightness Down"},
+	{0x102, L"Suspend"},
+	{0x103, L"Hibernate"},
+	{0x104, L"Toggle Display"},
+	{0x105, L"Recovery"},
+	{0x106, L"Reject"},
+	{0x0, NULL},
+};
+
+u16 *efi_st_translate_char(u16 code)
+{
+	struct efi_st_translate *tr;
+
+	if (code >= ' ') {
+		efi_st_ch[1] = code;
+		return efi_st_ch;
+	}
+	for (tr = efi_st_control_characters; tr->text; ++tr) {
+		if (tr->code == code)
+			return tr->text;
+	}
+	return efi_st_unknown;
+}
+
+u16 *efi_st_translate_code(u16 code)
+{
+	struct efi_st_translate *tr;
+
+	for (tr = efi_st_scan_codes; tr->text; ++tr) {
+		if (tr->code == code)
+			return tr->text;
+	}
+	return efi_st_unknown;
+}
+
 int efi_st_memcmp(const void *buf1, const void *buf2, size_t length)
 {
 	const u8 *pos1 = buf1;
